package com.han.factory.after.factory_method;

/**
 * @ClassName Client
 * @Description 描述该类的功能
 * @Author duoduo Han
 * @Date 2024/6/4 12:54
 */
public class Client {
    public static void main(String[] args) {
        //创建咖啡店
        CoffeeStore store = new CoffeeStore();
        //创建对象
//        CoffeeFactory factory = new AmericanCoffeeFactory();
        CoffeeFactory factory = new LatteCoffeeFactory();
        store.setFactory(factory);

        //点咖啡
        Coffee coffee = store.orderCoffee();
        System.out.println(coffee.getName());
    }
}
